package com.itheima.二维数组;

/*
   求最大值
 */
public class Work09 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 4, 5, 7, 8, 6, 3, 5, 4};
        System.out.println("Min= " + getMin(arr));
    }

    public static int getMin(int[] arr) {
        int min = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (min > arr[i]) {
                min = arr[i];
            }
        }
        return min;
    }
}
